<?php


use Illuminate\Support\Facades\Route;

Route::namespace('admin')->group(function (){
    //需要登录并且进行鉴权
    Route::prefix('nnhbjikl')->middleware('checkAdminLoginAndCheAuth')->group(function (){
        Route::any('/','HomeController@index')->name('admin.main');
        Route::any('/homemain','HomeController@homemain')->name('admin.homemain');



        Route::any('/goods','GoodsController@goods')->name('admin.goods.goods');
        Route::any('/add_goods','GoodsController@add')->name('admin.goods.add');
        Route::any('/edit_goods','GoodsController@edit')->name('admin.goods.edit');
        Route::any('/del_goods','GoodsController@del')->name('admin.goods.del');


        Route::any('/get_category','CategoryController@lists')->name('admin.category.lists');
        Route::any('/add_category','CategoryController@add')->name('admin.category.add');
        Route::any('/update_category','CategoryController@update')->name('admin.category.update');



        Route::any('/orders','OrdersController@orders')->name('admin.orders.orders');
        Route::any('/orders_no_page','OrdersController@orders_no_page')->name('admin.orders.orders_no_page');
        Route::any('/send_huo','OrdersController@send_huo')->name('admin.orders.send_huo');





        Route::any('cursors','CursorController@cursors')->name('admin.cursors.cursors');
        Route::any('/add_cursors','CursorController@add')->name('admin.cursors.add');
        Route::any('/edit_cursors','CursorController@edit')->name('admin.cursors.edit');
        Route::any('/del_cursors','CursorController@delete')->name('admin.cursors.del');



        Route::any('/bills','BillsController@bills')->name('admin.bills.bills');
        Route::any('/bills_score','BillsController@bills_score')->name('admin.bills_score.bills_score');
        Route::any('/recharge_orders','BillsController@recharge_orders')->name('admin.bills.recharge_orders');
        Route::any('/recharge_audit','BillsController@recharge_audit')->name('admin.bills.recharge_audit');

        Route::any('/widthwals','WidthwalsController@widthwals')->name('admin.widthwals.widthwals');
        Route::any('/edit_widthwals','WidthwalsController@edit')->name('admin.widthwals.edit');

        Route::any('/users','UsersController@users')->name('admin.users.users');
        Route::any('/users_urgrade','UserUrgradeController@user_urgrade')->name('admin.user.users_upgrade');
        Route::any('/recharge','UsersController@recharge')->name('admin.users.recharge');
        Route::any('/recharge_score','UsersController@recharge_score')->name('admin.users.recharge_score');
        Route::any('/edit','UsersController@edit')->name('admin.users.edit');



        Route::any('/chats','ChatsController@chats')->name('admin.chats.chats');
        Route::any('/del_chats','ChatsController@del')->name('admin.chats.del');
        Route::any('/edit_chats','ChatsController@edit')->name('admin.chats.edit');
    });




    //不需要登录的后台接口
    Route::prefix('nnhbjikl')->group(function (){
        Route::any('login','LoginController@login')->name('admin.login');//后台用户登录

        Route::any('file_up','HomeController@file_up')->name('admin.file_up');
        Route::any('file_up1','HomeController@local1')->name('admin.local1');
        Route::any('file_up2','HomeController@file_up2')->name('admin.local2');
    });
});
